<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jsp"%>
<html>
	<head>
		<script type="text/javascript" src="<%=contextPath%>/js/jquery-1.3.2.min.js"></script> 
		<script type="text/javascript" src="<%=contextPath%>/js/validator.js"></script> 
		<script type="text/javascript" language="javascript">  
		
			Ext.onReady(function(){
				var tb = new Ext.Toolbar({
			   		renderTo: document.all.tbar,
			    	items: [
				        {
				            text: '保存',
				            icon:"<%=contextPath%>/images/save.gif",
				            handler:toCheck,
				            hidden:<%=session.getAttribute("btn_savecydy_display") != null 
				            || "1".equals(session.getAttribute("SESSION_ISADMIN")) ? false:true%>
				        },'-',
				        {
				            text: '返回',
				            icon:"<%=contextPath%>/images/fanhui.png",
				            handler:function(){
				            	back();
				            }
				        }
			    	]
			    });
			});
		  
			function toCheck(){

			  	if(!Validator.Validate(frmM,2)){
				  return false;
			  	}
			  	
			  	comt();
			  
  				//data: 'cydy.dycode=' + frmM.elements["cydy.dycode"].value + "&cydy.dytype=" + frmM.elements["cydy.dytype"].value+"&pagetype=cydy",
  				
		    }   

		 </script>  
	</head>
	<body>
		<div id = "tbar"></div>
		<center>
			<!-- 信息提示 -->
			<div result><font color="red">${info }</font></div>
		</center>
		<form id="frmM" class="ct" name="frmM" method="POST" action="<%=contextPath%>/dic!save.do">
			<s:hidden name="cydy.id" />
			<s:hidden name="cydy.dytype" />
			<s:hidden name="cydy.sortid" />
			<s:hidden name="pagetype" value="cydy"/>
			<table width="100%" id="infotab">
				<tr>
					<th class="rt" width="120" nowrap>常用短语类别：
					</th>
					<td>
						<input type="text" name="cydy.dytypename" id="cydy.dytypename" readonly="true"  style="width:50%"  value="${cydy.dytypename}"/>
						
					</td>
				</tr>
				<!--tr>
					<th class="rt" width="120" nowrap>
						<font color="red">*</font>&nbsp;编号：
					</th>
					<td>
						<c:if test="${cydy.id == '0'}">
							<input type="text" name="cydy.dycode" id="cydy.dycode" datatype="Require" maxlength="50" size="25" value="${cydy.dycode}" msg="编号必须输入。"/>
						</c:if>
						<c:if test="${cydy.id != '0'}">
							<input type="text" name="cydy.dycode" id="cydy.dycode" datatype="Require" readonly="true" maxlength="50" size="25" value="${cydy.dycode}" msg="编号必须输入。"/>
						</c:if>
					</td>
				</tr-->
				<tr>
					<th class="rt" width="120" >
						<font color="red">*</font>&nbsp;常用短语：
					</th>
					<td nowrap>

						<input type="text" name="cydy.dyname" datatype="Require" maxlength="50" style="width:100%" value="${cydy.dyname}" msg="常用短语必须输入。"/>

					</td>
				</tr>
				
				<tr>
					<th class="rt" width="120" nowrap>
						备注：
					</th>
					<td>
						<textarea name="cydy.bz" require="false" datatype="LimitB" min="0" max="200"  rows="4" cols="60" msg="备注最大输入100个汉字或者200个字符。">${cydy.bz}</textarea>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>
<script language="javascript">

	 // 保存
     function comt(){
     	document.frmM.action = "<%=contextPath%>/dic!save.do";
     	document.frmM.submit();
     }
     
     // 返回
     function back() {
     	document.frmM.action = "<%=contextPath%>/cydyList!getList.do";
		document.frmM.submit();
     }

</script>